//
//  TF_BackMoreView.swift
//  TalkfunSDKDemo
//
//  Created by 邓盛明 on 2021/12/6.
//  Copyright © 2021 Talkfun. All rights reserved.
//

import UIKit

class TF_BackMoreView: UIView {

    var titleLab:UILabel!
    var closeBtn:UIButton!
   @objc public var AlbumBtn:TF_MoreButton! //专辑
   @objc public var askRecordBtn:TF_MoreButton! //提问记录
    @objc public var netWorkBtn:TF_MoreButton!//网络选择
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.titleLab = UILabel.init()
        self.titleLab.text = "更多";
        self.titleLab.textColor = UIColor(red: 48/255.0, green: 51/255.0, blue: 75/255.0, alpha: 1.0)
        
        self.titleLab.textAlignment = .center;
        self.titleLab.font = UIFont.PingFang(size: 18)
        addSubview(self.titleLab)
       
        self.closeBtn = UIButton.init()
        self.closeBtn.setImage(UIImage.init(named: "HTLive.bundle/close_gray"), for: .normal)

        addSubview(self.closeBtn)
       
        self.askRecordBtn = TF_MoreButton.init()
        self.askRecordBtn.img.image = UIImage.init(named: "HTLive.bundle/asklist")
       
        self.askRecordBtn.lab.text = "提问记录";
        addSubview(self.askRecordBtn)
        
        self.netWorkBtn = TF_MoreButton.init()
        self.netWorkBtn.img.image = UIImage.init(named: "HTLive.bundle/net_more")
       
        self.netWorkBtn.lab.text = "网络选择";
        addSubview(self.netWorkBtn)
      
        
        self.AlbumBtn = TF_MoreButton.init()
        self.AlbumBtn.img.image = UIImage.init(named: "HTLive.bundle/zhunjiicon")
        self.AlbumBtn.isHidden = true
        self.AlbumBtn.lab.text = "专辑";
        addSubview(self.AlbumBtn)
        
        
        
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.titleLab.frame = CGRect(x: (self.frame.size.width-100)/2.0, y: 16, width: 100, height: 25)
       
        self.closeBtn.frame = CGRect(x:self.frame.size.width-30-12, y: 13, width: 30, height: 30)
        self.askRecordBtn.frame = CGRect(x:0, y: self.titleLab.frame.maxY, width: self.frame.size.width/4.0, height: 60)
        self.netWorkBtn.frame = CGRect(x:self.askRecordBtn.frame.maxX, y: self.titleLab.frame.maxY, width: self.frame.size.width/4.0, height: 60)
        self.AlbumBtn.frame = CGRect(x:self.askRecordBtn.frame.maxX, y: self.titleLab.frame.maxY, width: self.frame.size.width/4.0, height: 60)
   
    }

    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
